#!/usr/bin/env python

# -*- coding: utf-8 -*

"""
寻线传感器，一共有4个寻线传感器，左右各两个
"""

from py_code.driver.Pin import Pin
from py_code.SingletonType import SingletonType
from py_code.driver.GpioDriver import GpioDriver
import RPi.GPIO as GPIO


class Track(GpioDriver, metaclass = SingletonType):
    """寻线传感器，一共4个传感器（未测试）"""
    pins = [Pin(13, GPIO.IN, description = "left1"), Pin(15, GPIO.IN, description = "left2"), Pin(11, GPIO.IN, description = "right1"), Pin(7, GPIO.IN, description = "right2")]
    

    """
    实际运用的函数暂时不写，可直接调用pins读取pin数据，
    读取到GPIO.LOW说明下面是黑线，同时灯亮；
    反之读取到GPIO.HIGH说明下面不是黑线，灯不亮
    """
